package com.cs.study.homework._0227;

public class Demo2 {
    public static void main(String[] args) {
        A a1 = new A();
        A a2 = new A();
        B b = new B();
        Class s1 = a1.getClass();
        Class s2 = a2.getClass();
        Class s3 = b.getClass();
        System.out.println(s1 == s2);
        System.out.println(s1 == s3);
        judgeObjectType(s1,s2);
        judgeObjectType(s1,s3);
    }
    public static boolean judgeObjectType(Object o1, Object o2) {
        return o1.getClass() == o2.getClass();
    }
}

class A {

}

class B {

}
